#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int h, m, k;
	scanf("%d:%d", &h, &m);
	scanf("%d", &k);
	h = (h + (k + m) / 60) % 24;
	m = (k + m) % 60;
	printf("%d:%d", h, m);
	return 0;
}